﻿
@{
    ViewBag.Title = "Index";
}

<link href="~/Content/font-awesome.css" rel="stylesheet" />
<link href="~/Content/summernote.css" rel="stylesheet" />



<div id="summernote">Hello Summernote</div>

<input type="button" id="tt" value="jj"/>

@section scripts{
<script src="~/Scripts/summernote.js"></script>
    <script>
        $(document).ready(function () {
            $('#summernote').summernote();
           
           
            //editor.createLink($('#summernote'), 'hello', "http://www.ccc.com", true);
        });

        $('#tt').click(function() {
          //  $(document.getSelection().anchorNode.parentNode).append('appended!');


            var node = $('<A href=\'idkdk\'>' + "hello"+ '</A>')[0];
            var span= $('<span></span>')[0];
            $(document.getSelection().anchorNode.parentNode).append(node).append(span);
            

            //alert($('#summernote').code())
        });

</script>
}
